package com.ruoyi.house_sale.service.impl;

import java.util.List;

import com.ruoyi.house_sale.mapper.ProjectInfoMapper;
import org.springframework.stereotype.Service;
import com.ruoyi.house_sale.mapper.TerminfoMapper;
import com.ruoyi.house_sale.domain.Terminfo;
import com.ruoyi.house_sale.service.ITerminfoService;

import javax.annotation.Resource;

/**
 * 楼栋资料Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-28
 */
@Service
public class TerminfoServiceImpl implements ITerminfoService 
{
    @Resource
    private TerminfoMapper terminfoMapper;
    @Resource
    ProjectInfoMapper projectInfoMapper;

    /**
     * 查询楼栋资料
     * 
     * @param termid 楼栋资料主键
     * @return 楼栋资料
     */
    @Override
    public Terminfo selectTerminfoByTermid(Long termid)
    {
        return terminfoMapper.selectTerminfoByTermid(termid);
    }

    /**
     * 查询楼栋资料列表
     * 
     * @param terminfo 楼栋资料
     * @return 楼栋资料
     */
    @Override
    public List<Terminfo> selectTerminfoList(Terminfo terminfo)
    {
        return terminfoMapper.selectTerminfoList(terminfo);
    }

    /**
     * 新增楼栋资料
     * 
     * @param terminfo 楼栋资料
     * @return 结果
     */
    @Override
    public int insertTerminfo(Terminfo terminfo)
    {
        return terminfoMapper.insertTerminfo(terminfo);
    }

    /**
     * 修改楼栋资料
     * 
     * @param terminfo 楼栋资料
     * @return 结果
     */
    @Override
    public int updateTerminfo(Terminfo terminfo)
    {
        return terminfoMapper.updateTerminfo(terminfo);
    }

    /**
     * 批量删除楼栋资料
     * 
     * @param termids 需要删除的楼栋资料主键
     * @return 结果
     */
    @Override
    public int deleteTerminfoByTermids(Long[] termids)
    {
        return terminfoMapper.deleteTerminfoByTermids(termids);
    }

    /**
     * 删除楼栋资料信息
     * 
     * @param termid 楼栋资料主键
     * @return 结果
     */
    @Override
    public int deleteTerminfoByTermid(Long termid)
    {
        return terminfoMapper.deleteTerminfoByTermid(termid);
    }

    @Override
    public List<Terminfo> findAllTerm() {
        return terminfoMapper.findAllTerm();
    }


}
